package viroyal.com.base.activity.engineering;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.j256.ormlite.stmt.query.In;

import viroyal.com.base.R;

/**
 * @author gaochao
 */
public class EngineeringListActivity extends AppCompatActivity implements View.OnClickListener {
  private RelativeLayout rlDeviceRegister, rlDeviceInfo;
  private ImageView ivBack;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_engineering_list);
    rlDeviceRegister = findViewById(R.id.rl_device_register);
    rlDeviceInfo = findViewById(R.id.rl_device_id);
    rlDeviceRegister.setOnClickListener(this);
    rlDeviceInfo.setOnClickListener(this);
    ivBack = findViewById(R.id.ic_back);
    ivBack.setOnClickListener(this);
  }

  @Override
  public void onClick(View view) {
    switch (view.getId()) {
      case R.id.rl_device_register:
        //设备注册
        startActivity(new Intent(this, EngineeringActivity.class));
        break;
      case R.id.rl_device_id:
        //查看设备名称
        startActivity(new Intent(this, DeviceInfoActivity.class));
        break;
      case R.id.ic_back:
        //返回
        this.finish();
        default:
          break;
    }
  }
}
